package user

import "context"

type UserOrgRepositoryIface interface {
	// GetUsersByOrgId 根据部门编号获取部门员工
	GetUsersByOrgId(ctx context.Context, orgId int64) ([]*GfyxUserOrganizationRelationPo, error)
	// GetAllUsersByOrgId 根据部门编号获取所有子部门的员工
	GetAllUsersByOrgId(ctx context.Context, orgIds []int64) ([]*GfyxUserOrganizationRelationPo, error)
	// GetListByUserIds 根据用户编号获取部门信息
	GetListByUserIds(ctx context.Context, userIds []int64) ([]*GfyxUserOrganizationRelationPo, error)
	// SetDepartmentHeader 设置负责人/取消负责人
	SetDepartmentHeader(ctx context.Context, userId []int64, orgId int64, userGuids []string, orgGuid string) error
	// GetUserResponsibleList 获取区域负责人
	GetUserResponsibleList(ctx context.Context) ([]*UserResponsible, error)
	// GetMyResponseOrgUserIds 获取我负责的区域的所有用户id
	GetMyResponseOrgUserIds(ctx context.Context, userId int64) ([]int64, error)
	// GetMyResponseSubOrgUserIds 获取我负责的区域的子区域的所有用户id
	GetMyResponseSubOrgUserIds(ctx context.Context, userId int64) ([]int64, error)
	// GetMyResponseOrgUserGuids 获取我负责的区域的所有用户 guid
	GetMyResponseOrgUserGuids(ctx context.Context, userId int64) ([]string, error)
	// GetMyResponseSubOrgUserGuids 获取我负责的区域的子区域的所有用户 guid
	GetMyResponseSubOrgUserGuids(ctx context.Context, userId int64) ([]string, error)
	// DeletedUserOrgRelation 删除用户组织关系
	DeletedUserOrgRelation(ctx context.Context, userId int64) error
	// SaveUserOrgRelation 保存用户组织关系
	SaveUserOrgRelation(ctx context.Context, po *GfyxUserOrganizationRelationPo) error
	// SetDepartmentHeaderNew 设置部门负责人临时处理
	SetDepartmentHeaderNew(ctx context.Context, userIds []int64, orgId int64) error
	// 追加区域负责人
	AppendDepartmentHeader(ctx context.Context, userId int64, orgId int64, userGuid string, orgGuid string) error
}
